package com.dingreading.cloud.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 实体类。
 *
 * @author Administrator
 * @since 2023-11-22
 */
@Data
@Table(value = "cmorders")
public class Cmorders implements Serializable {

    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 订单号
     */
    @ApiModelProperty(value = "订单号")
    private String orderCode;

    /**
     * 公司uid
     */
    @ApiModelProperty(value = "公司uid")
    private String corpUid;

    /**
     * 门店uid
     */
    @ApiModelProperty(value = "门店uid")
    private String storeUid;

    /**
     * 门店名称
     */
    @ApiModelProperty(value = "门店名称")
    private String storeName;

    /**
     * 会员uid
     */
    @ApiModelProperty(value = "会员uid")
    private String memberUid;

    /**
     * 会员名称
     */
    @ApiModelProperty(value = "会员名称")
    private String memberName;

    /**
     * 合同编号
     */
    @ApiModelProperty(value = "合同编号")
    private String contractCode;

    /**
     * 收入类型 体验会员:EXP，正式会员新签:NEW，续费:RENEW、升级，拓科:EXT，订金:EMD 退费:REFUND
     */
    @ApiModelProperty(value = "收入类型")
    private String orderType;

    /**
     * 收款金额
     */
    @ApiModelProperty(value = "收款金额")
    private Double orderAmount;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String orderRemark;

    /**
     * 礼品领取 已领取:1，未领取:0
     */
    @ApiModelProperty(value = "礼品领取 已领取:1，未领取:0")
    private String giftGotten;

    /**
     * 礼品备注
     */
    @ApiModelProperty(value = "礼品备注")
    private String giftRemark;

    /**
     * 收款方式 收款码:CCB_QR，开单工具:SALE_TOOL，现金:CASH，银行转账:BANK，收银机/POS机:POS
     */
    @ApiModelProperty(value = "收款方式")
    private String payChannelCode;

    @ApiModelProperty(value = "服务项目数量")
    private Integer serviceNum;

    /**
     * 签单人uid
     */
    @ApiModelProperty(value = "签单人uid")
    private String saleStaffUid;

    /**
     * 签单人电话
     */
    @ApiModelProperty(value = "签单人电话")
    private String saleStaffPubPhone;

    /**
     * 签单人电话
     */
    @ApiModelProperty(value = "签单人电话")
    private String saleStaffPriPhone;

    /**
     * 签单人姓名
     */
    @ApiModelProperty(value = "签单人姓名")
    private String saleStaffFullName;

    /**
     * 签单人昵称
     */
    @ApiModelProperty(value = "签单人昵称")
    private String saleStaffNickName;

    /**
     * 财务审核状态 0.待审批 1.审批通过 -1.审批拒绝
     */
    @ApiModelProperty(value = "财务审核状态")
    private Integer status;

    /**
     * 财务审核状态名
     */
    @ApiModelProperty(value = "财务审核状态名")
    private String statusName;

    /**
     * 创建人uid
     */
    @ApiModelProperty(value = "创建人uid")
    private String addStaffUid;

    /**
     * 创建人姓名
     */
    @ApiModelProperty(value = "创建人姓名")
    private String addStaffName;

    /**
     * 更新人uid
     */
    @ApiModelProperty(value = "更新人uid")
    private String lastStaffUid;

    /**
     * 更新人姓名
     */
    @ApiModelProperty(value = "更新人姓名")
    private String lastStaffName;

    /**
     * 收款日期
     */
    @ApiModelProperty(value = "收款日期")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date orderDate;

    /**
     * 添加时间
     */
    @ApiModelProperty(value = "添加时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()")
    private Date addTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private Date lastEditTime;

    /**
     * 收支类型 1.收入 2.支出
     */
    @ApiModelProperty(value = "收支类型")
    private Integer inoutType;

    /**
     * 收支类型名称 1.收入 2.支出
     */
    @ApiModelProperty(value = "收支类型")
    private String inoutTypeName;

    /**
     * 关联订单号
     */
    @ApiModelProperty(value = "关联订单号")
    private String relationCode;

    /**
     * 订单状态 1.正常 2.变更 3.退费 4.已变更 5.已退费 6.已变更/退费
     */
    @ApiModelProperty(value = "订单状态")
    private Integer orderState;

    /**
     * 订单状态名称 1.正常 2.变更 3.退费
     */
    @ApiModelProperty(value = "订单状态")
    private String orderStateName;

    /**
     * 结转金额
     */
    private Double carriedForwardAmount;

    @ApiModelProperty(value = "变更日期")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd")
    private Date changeDate;

    /**
     * 收款登记uid
     */
    @ApiModelProperty(value = "收款登记uid")
    private String receiptUid;

    /**
     * 来源
     */
    @ApiModelProperty(value = "来源")
    private String source;

    /**
     * 数据来源
     * 1.叮叮 2.名师堂
     */
    @ApiModelProperty(value = "数据来源")
    private Integer databaseType;

}
